# This code would exit the client after confirming with the user. if system.gui.confirm("Are you sure you want to exit?"): system.util.exit()